package com.imooc.bilibili.elasticsearch;

import com.imooc.bilibili.domain.user.UserInfo;
import com.imooc.bilibili.domain.video.Video;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author gcq
 * @Create 2022-06-10
 */
public interface ElasticSearchService {

    void addVideo(Video video);

    Video getVideo(String keyword);

    void deleteAllVideos();

    void addUserInfo(UserInfo userInfo);

    /**
     * 复杂全文检索
     *
     * @param keyword
     * @param pageNo
     * @param pageSize
     * @return
     */
    List<Map<String, Object>> getContents(String keyword, Integer pageNo, Integer pageSize) throws IOException;
}